package org.nanotek.lucene.beans;

import org.apache.lucene.document.Field;
import org.nanotek.Base;

/**
 * Rationale: The Entity Class which store the values for a specific lucene document.
 * @author JoseCanova
 *
 */
/*
 * TODO - Finish Hibernate Types for Field.Store and Field.Index.
 */
@SuppressWarnings("serial")
public class FieldBuilder implements Base<String> {

	private String id; 
	private String name; 
	private Boolean storeTermVector  = false;
	private Boolean storeOffsetWithTermVector  = false;
	private boolean storePositionWithTermVector  = false;
	private boolean omitTermFreqAndPositions = false;
	private Field.Store store = Field.Store.YES; 
	private Field.Index fieldIndex = Field.Index.ANALYZED; 
	private Field.TermVector termVectors = Field.TermVector.NO;
	private DocumentBuilder parentDocument; 

	public FieldBuilder() {}

	@Override
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getStoreTermVector() {
		return storeTermVector;
	}

	public void setStoreTermVector(Boolean storeTermVector) {
		this.storeTermVector = storeTermVector;
	}

	public Boolean getStoreOffsetWithTermVector() {
		return storeOffsetWithTermVector;
	}

	public void setStoreOffsetWithTermVector(Boolean storeOffsetWithTermVector) {
		this.storeOffsetWithTermVector = storeOffsetWithTermVector;
	}

	public boolean isStorePositionWithTermVector() {
		return storePositionWithTermVector;
	}

	public void setStorePositionWithTermVector(boolean storePositionWithTermVector) {
		this.storePositionWithTermVector = storePositionWithTermVector;
	}

	public boolean isOmitTermFreqAndPositions() {
		return omitTermFreqAndPositions;
	}

	public void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions) {
		this.omitTermFreqAndPositions = omitTermFreqAndPositions;
	}

	public Field.Store getStore() {
		return store;
	}

	public void setStore(Field.Store store) {
		this.store = store;
	}
	
	public Field.Index getFieldIndex() {
		return fieldIndex;
	}

	public void setFieldIndex(Field.Index fieldIndex) {
		this.fieldIndex = fieldIndex;
	}
	
	public Field.TermVector getTermVectors() {
		return termVectors;
	}

	public void setTermVectors(Field.TermVector termVectors) {
		this.termVectors = termVectors;
	}
	
	public DocumentBuilder getParentDocument() {
		return parentDocument;
	}

	public void setParentDocument(DocumentBuilder parentDoc) {
		this.parentDocument = parentDoc;
	}
	
}
